package br.ufpe.cin.analysis.plugin.entities;

import java.util.ArrayList;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;

@XmlRootElement
@XmlType(propOrder = { "namae", "selected", "metricList"} )
public class Activity implements ISelectable {
	
	
	@XmlElement(name = "activityName")
	private String namae;
	
	private boolean selected;
	
	@XmlElementWrapper(name = "metricList")
	@XmlElement(name = "metric")
	private ArrayList<Metric> metricList;

	
	public Activity(ArrayList<Metric> metricList, String name)
	{
		this.metricList = metricList;
		this.namae = name;
		this.selected = true;
	}
	
	public Activity(String name)
	{
		this(new ArrayList<Metric>(),name);
	}
	
	
	public Activity()
	{
		this(null,null);
	}
	
	

	public boolean getSelected() {
		return this.selected;
	}

	public void setSelected(boolean selected) {
		this.selected = selected;
		
	}
	
	@XmlTransient
	public ArrayList<Metric> getMetrics() {
		return metricList;
	}

	public void setMetrics(ArrayList<Metric> metricList) {
		this.metricList = metricList;
	}
	
	
	@XmlTransient
	public String getName() {
		return this.namae;
	}

	public void setName(String name) {
		this.namae = name;
	}
	
	public String toString()
	{
		return "Activity: " + this.namae;
	}
	
	
	
	
	

}
